home *** CD-ROM | disk | FTP | other *** search
- property pType, pAmount, pState, pBet, pBetList
-
- on new me, typeOfBet, amountBet, aCardDenomination, winOrLose, theBetList
- me.pType = typeOfBet
- me.pAmount = amountBet
- me.pState = me.mGetBetState()
- me.pBet = me.mSetBet(aCardDenomination, winOrLose)
- me.pBetList = theBetList
- return me
- end
-
- on mGetBetState me
- if (me.pType = #single) or (me.pType = #set) then
- return #rigid
- else
- if me.pType = #special then
- return #flexible
- end if
- end if
- end
-
- on mSetBet me, acd, wol
- return [#denomination: acd, #outcome: wol]
- end
-
- on mRemoveBet me, num
- me.pBetList.deleteProp(num)
- end
-
- on mAddToAmountBet me, addBet
- pAmount = pAmount + addBet
- end
-
- on mSubtractFromAmountBet me, sOut
- if pState = #flexible then
- if sOut <= pAmount then
- pAmount = pAmount - sOut
- end if
- if me.pAmount = 0 then
- end if
- end if
- end
-